﻿using CQRSDemo.Application.Abstractions.Messaging;
using CQRSDemo.Application.Orders.Queries.Response;

namespace CQRSDemo.Application.Orders.Queries.GetOrder;

internal sealed class GetOrderQueryHandler : IQueryHandler<GetOrderQuery, OrderResponse>
{
    public Task<OrderResponse> Handle(GetOrderQuery request, CancellationToken cancellationToken)
    {
        return Task.FromResult(new OrderResponse()
        {
             Id = request.Id,
        });
    }
}